package com.rwdesign.springboot.Waimai.service.Impl;

import com.rwdesign.springboot.Waimai.dao.ShopMapper;
import com.rwdesign.springboot.Waimai.entity.Shop;
import com.rwdesign.springboot.Waimai.service.ShopService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author rystart
 * @create 2022-01-29 12:39
 */
@Service
@Slf4j
public class ShopServiceImpl implements ShopService {

    @Resource
    private ShopMapper shopMapper;

    @Override
    public List<String> selectAllShopTypes() {
        return shopMapper.selectAllShopTypes();
    }

    @Override
    public List<Shop> selectAllShops(String shopType) {
        return shopMapper.selectAllShops(shopType);
    }

    @Override
    public Integer createShop(Shop shop) {
        return shopMapper.createShop(shop);
    }

    @Override
    public List<Shop> selectShopByShopId(Integer shopId) {
        return shopMapper.selectShopByShopId(shopId);
    }

    @Override
    public Integer updateShopByShopId(Shop shop) {
        return shopMapper.updateShopByShopId(shop);
    }


}
